/* ===== 全局样式重置和基础设置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --white-color: #ffffff;
    --dark-gray: #34495e;
    --light-gray: #f5f6fa;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 图片懒加载过渡效果 ===== */
.lazy-image {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lazy-image.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 深色模式支持 ===== */
/* 深色模式变量 */
.dark-mode {
    --dark-color: #ecf0f1;
    --light-color: #121212;
    --light-gray: #1e1e1e;
    --white-color: #2c2c2c;
    --dark-gray: #bdc3c7;
}

/* 深色模式下的组件样式 */
.dark-mode .navbar {
    background-color: rgba(44, 44, 44, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .mobile-menu {
    background-color: var(--white-color);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .hero::before {
    background-color: var(--primary-color);
    opacity: 0.15;
}

.dark-mode .about {
    background-color: var(--white-color);
}

.dark-mode .projects {
    background-color: var(--light-gray);
}

.dark-mode .skills {
    background-color: var(--white-color);
}

.dark-mode .contact {
    background-color: var(--light-gray);
}

.dark-mode .project-card {
    background-color: var(--white-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .skill-category {
    background-color: var(--light-gray);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .timeline::after {
    background-color: var(--dark-gray);
}

.dark-mode .timeline-content {
    background-color: var(--white-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.dark-mode .timeline-item::after {
    background-color: var(--white-color);
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background-color: var(--white-color);
    color: var(--dark-color);
    border-color: var(--dark-gray);
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.dark-mode .map {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dark-mode .back-to-top {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .achievement-item {
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dark-mode .certificate-item {
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 系统深色模式自动检测 */
@media (prefers-color-scheme: dark) {
    body {
        --dark-color: #ecf0f1;
        --light-color: #121212;
        --light-gray: #1e1e1e;
        --white-color: #2c2c2c;
        --dark-gray: #bdc3c7;
    }
    
    .navbar {
        background-color: rgba(44, 44, 44, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-menu {
        background-color: var(--white-color);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .hero::before {
        background-color: var(--primary-color);
        opacity: 0.15;
    }
    
    .about {
        background-color: var(--white-color);
    }
    
    .projects {
        background-color: var(--light-gray);
    }
    
    .skills {
        background-color: var(--white-color);
    }
    
    .contact {
        background-color: var(--light-gray);
    }
    
    .project-card {
        background-color: var(--white-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    
    .skill-category {
        background-color: var(--light-gray);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .timeline::after {
        background-color: var(--dark-gray);
    }
    
    .timeline-content {
        background-color: var(--white-color);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    }
    
    .timeline-item::after {
        background-color: var(--white-color);
    }
    
    .form-group input,
    .form-group textarea {
        background-color: var(--white-color);
        color: var(--dark-color);
        border-color: var(--dark-gray);
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }
    
    .map {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .back-to-top {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    .achievement-item {
        background-color: var(--white-color);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .certificate-item {
        background-color: var(--white-color);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

/* ===== 标题样式 ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

/* ===== 段落和文本样式 ===== */
p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

/* ===== 高亮文本样式 ===== */
.highlight {
    color: var(--primary-color);
}

/* ===== 导航栏样式 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo .logo-text {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-color);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}
/* ===== 主题切换按钮样式 ===== */
.theme-toggle,
.mobile-theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark-color);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle {
    margin-left: 20px;
    display: none; /* 默认在移动端隐藏 */
}

.theme-toggle:hover {
    background-color: var(--light-gray);
    transform: rotate(15deg);
}

/* ===== 移动端菜单按钮 ===== */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
    margin-left: 10px;
}

  /* ===== 移动端菜单样式 ===== */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--white-color);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: var(--transition);
    padding: 60px 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu a {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: var(--dark-color);
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.mobile-menu a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* ===== 英雄区域样式 ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0.05;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 500px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 350px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* ===== 通用区块样式 ===== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-divider {
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

/* ===== 关于我区块样式 ===== */
.about {
    background-color: var(--white-color);
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: -1;
    border-radius: var(--border-radius);
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.about-text {
    flex: 1;
}

.personal-info {
    margin: 20px 0;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.info-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-right: 15px;
    min-width: 100px;
}

.info-value {
    color: var(--dark-gray);
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light-gray);
    color: var(--dark-color);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

/* ===== 作品集区块样式 ===== */
.projects {
    background-color: var(--light-gray);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--white-color);
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 20px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    text-align: center;
    color: var(--white-color);
}

.project-info h4 {
    color: var(--white-color);
    margin-bottom: 10px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    margin-top: 15px;
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--secondary-color);
    transform: scale(1.2);
    color: var(--white-color);
}

/* ===== 技能区块样式 ===== */
.skills {
    background-color: var(--white-color);
}

.skills-content {
    display: flex;
    gap: 50px;
}

.technical-skills {
    flex: 1;
}

.professional-skills {
    flex: 1;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-name {
    font-weight: 600;
    color: var(--dark-color);
}

.skill-percentage {
    font-weight: 600;
    color: var(--primary-color);
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-category {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.skill-category i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-category h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.skill-category li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== 联系区块样式 ===== */
.contact {
    background-color: var(--light-gray);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 30px;
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-social {
    margin-top: 30px;
}

.contact-social h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--gray-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ===== 地图容器样式 ===== */
.map-container {
    margin-top: 30px;
}

.map-container h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.map {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.view-map-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.view-map-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== 表单错误和成功消息样式 ===== */
.form-group input.error,
.form-group textarea.error {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: var(--accent-color);
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.form-success-message {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--secondary-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    border: 2px solid var(--secondary-color);
}

/* ===== 个人成就和证书样式 ===== */
.achievements-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
}

/* 成就列表样式 */
.achievements-list {
    flex: 1;
    min-width: 300px;
}

.achievements-list h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.achievement-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.achievement-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.achievement-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
    padding: 12px;
    background-color: rgba(255, 102, 102, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.achievement-text {
    flex: 1;
}

.achievement-text h4 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.achievement-text p {
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.achievement-date {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

/* 证书样式 */
.certificates {
    flex: 1;
    min-width: 300px;
}

.certificates h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.certificate-item {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.certificate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.certificate-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.certificate-image {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.certificate-image:hover img {
    transform: scale(1.05);
}

.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-image:hover .certificate-overlay {
    opacity: 1;
}

.certificate-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--white-color);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 20px;
    transition: var(--transition);
}

.certificate-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: scale(1.1);
}

.certificate-item h4 {
    margin: 15px 15px 8px;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.certificate-item p {
    margin: 0 15px 15px;
    font-size: 14px;
    color: var(--dark-gray);
}

/* ===== 时间线样式 ===== */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
}

/* 时间线中心线 */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--light-gray);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    transition: var(--transition);
}

/* 时间线项目 */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

/* 交错排列时间线项目 */
.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* 时间线内容 */
.timeline-content {
    padding: 20px 30px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

/* 时间线项目的圆点 */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--white-color);
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

/* 时间线日期 */
.timeline-date {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* 时间线公司 */
.timeline-company {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

.timeline-content h3 {
    margin-bottom: 12px;
    color: var(--dark-color);
}

/* 显示在视口中的时间线项目 */
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式时间线 - 手机屏幕 */
@media (max-width: 768px) {
    /* 隐藏中心线 */
    .timeline::after {
        left: 31px;
    }
    
    /* 所有时间线项目在移动设备上都靠左显示 */
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    /* 所有圆点都在左侧 */
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
        right: auto;
    }
}

/* ===== 页脚样式 ===== */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo,
.footer-links,
.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-logo .logo-text {
    color: var(--white-color);
}

.footer-logo p {
    color: var(--gray-color);
    margin-top: 15px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-color);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    color: var(--gray-color);
}

.footer-contact li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.footer-bottom {
    border-top: 1px solid var(--dark-gray);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom .social-links {
    margin-top: 0;
}

.copyright {
    color: var(--gray-color);
    font-size: 14px;
}

/* ===== 返回顶部按钮样式 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===== 响应式设计 ===== */
@media (min-width: 769px) {
    .theme-toggle {
        display: block;
    }
}

@media (max-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
        padding: 60px 20px;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .hero-image {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    .personal-info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .skills-content {
        flex-direction: column;
    }
    
    .skill-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }
    
    .personal-info {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 响应式设计 - 手机竖屏 ===== */
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 80px 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .project-filters {
        flex-wrap: wrap;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    .mobile-menu {
        width: 90%;
    }
    
    .hero-image img {
        max-width: 250px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }
}